﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using kp.compiler.contract;
using kp.koordinator.contract;
using kp.plotter;
using kp.plotter.contract;

namespace PortalTestExe
{
    public class MyKoordinator : kp.koordinator.contract.IKoordinator
    {
        #region IKoordinator Members

        public IEnumerable<System.Drawing.PointF> Berechne(string formel, double xMin, double xMax, int werteanzahl)
        {
            throw new NotImplementedException();
        }

        #endregion

        public void ProcessBerechnungsauftrag(Berechnungsauftrag anfrage)
        {
            throw new NotImplementedException();
        }

        public event Action<CompilationRequest> OnCompilationRequest;
        public event Action<kp.rechenwerk.contract.Berechnungsauftrag> OnBerechnungsauftrag;
    }


    public class MyPlotter : UserControl1, IPlotter
    {
        public MyPlotter()
        {
            this.BackColor = Color.Blue;
        }


        #region IPlotter Members

        public void ShowPlot(IEnumerable<System.Drawing.PointF> punkte)
        {
            throw new NotImplementedException();
        }

        public int Werteanzahl
        {
            get { throw new NotImplementedException(); }
        }

        #endregion

        public void ProcessShowPlotCommand(ShowPlotCommand command)
        {
            throw new NotImplementedException();
        }

        public void ProcessWerteanzahlAnfrage(WerteanzahlAnfrage anfrage)
        {
            throw new NotImplementedException();
        }
    }


    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            MyKoordinator koordinator = new MyKoordinator();
            MyPlotter plotter = new MyPlotter();
            Portal p = new Portal(plotter);
            
            p.Show();
        }
    }
}
